Pkill

Section: Oct. 1, 1991 (2)
Updated: MiNT Programmer's Manual
Index Return to Main Contents
 

NAME

Pkill - send a signal to a process  

SYNOPSIS

#include <signal.h>

WORD Pkill( WORD pid, WORD sig);
 

DESCRIPTION

Pkill sends the signal described by sig to one or more processes, as follows:

If pid is a positive number, then the signal is sent to the process with that process id.

If pid is 0, the signal is sent to all members of the process group of the calling process (i.e. all processes which have the same process group number). This includes, of course, the calling process itself.

If pid is less than 0, the signal is sent to all processes with process group number -pid .  

RETURNS

0 if successful. Note that if the current process is a recipient of the signal, the Pkill call may not return at all if the process is killed.

ERANGE if sig is not a valid signal.

EFILNF if pid > 0 and the indicated process has terminated or does not exist, or if pid < 0 and there are no processes in the corresponding process group.

EACCDN if pid > 0, the sending process does not have an effective user id of 0, and the recipient process has a different user id from the sending process.  

SEE ALSO

Psetpgrp(2), Psignal(2)  

BUGS

The user id checks should also be performed when sending signals to process groups. Do not rely on the lack of checks, as this will be corrected at some point.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURNS
SEE ALSO
BUGS

This document was created by man2html, using the manual pages.
Time: 16:01:47 GMT, March 03, 2023